const path = require('path');
const mongoose = require('mongoose');

module.exports = {
  JWT_SECRET: 'your-secret-key',
  HOST: 'localhost',
  PORT: 9090,
  // MongoDB configuration
  MONGO_URI: process.env.MONGO_URI,
  
  connectDB: async function() {
    try {
      await mongoose.connect(this.MONGO_URI);
      console.log('MongoDB 连接成功');
    } catch (error) {
      console.error('MongoDB 连接失败 error:', error);
      process.exit(1);
    }
  }
};
